package com.tiantian.user.domain.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.tiantian.common.core.constant.UserConstants;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

/**
 * 用户对象导入VO
 *
 * @author tiantian
 */
@Data
public class SysUserImportVo {

    @NotBlank(message = "学号不能为空")
    @Length(min = 12, max = 12, message = "学号长度不符合规范")
    @Pattern(regexp = "^\\d+$", message = "学号必须由数字组成")
    @ExcelProperty(value = "学号")
    private String studentId;

    @NotBlank(message = "班级不能为空")
    @Length(min = 3, max = 20, message = "班级长度需要在3-20之间")
    @ExcelProperty(value = "班级")
    private String clasz;

    @NotBlank(message = "姓名不能为空")
    @Length(min = 2, max = 10, message = "姓名长度需要在2-10之间")
    @ExcelProperty(value = "姓名")
    private String nickName;

    @NotBlank(message = "电话号码不能为空")
    @Length(min = 11, max = 11, message = "手机号码长度不符合规范")
    @Pattern(regexp = "^\\d+$", message = "电话号码必须由数字组成")
    @ExcelProperty(value = "电话号码")
    private String phonenumber;

    @Email(message = "邮箱格式不符合规范")
    @NotBlank(message = "邮箱不能为空")
    @Length(min = 3, max = 20, message = "邮箱长度不符合规范,需在20个字符以内")
    @ExcelProperty(value = "邮箱号")
    private String email;
}
